package com.web.ShoppingDemo.serviceImpl;

import javax.annotation.Resource;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import com.web.ShoppingDemo.model.Account;
import com.web.ShoppingDemo.service.AccountService;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations="classpath:applicationContext-*.xml")
public class AccountServiceImplTest {
	@Resource
	private AccountService accountService;
	
	@Test
	public void testSave() {
		accountService.save(new Account("admin","小强","admin..."));
	}

	@Test
	public void testUpdate() {
		accountService.update(new Account());
	}

	@Test
	public void testDelete() {
		accountService.delete(3);
	}

	@Test
	public void testGet() {
		System.out.println(accountService.get(2));
	}

	@Test
	public void testQuery() {
		System.out.println(accountService.query());
	}

}
